import request from "@/request/request.js"
import dynamicRouter from '@/router/dynamic-router.js'
// export const getType = (params) => {
//   return request.get("/type", params);
// }
// export const setType = (params) => {
//   return request.post("/setType", params);
// }



export const loginReq = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      const data = {
        code: 200,
        data: {
          token: 'sdfsfsdfsdf+dsf8_sdfsd',
        }
      }
      resolve(data)
    }, 100)
  })
}
export const getInfo = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      const data = {
        code: 200,
        data: {
          user: {},
          routers: [
            ...dynamicRouter
          ]
        }
      }
      resolve(data)
    }, 100)
  })
}

// export const getRouters = ()=>{

// }

export const logoutReq = (params) => {
  // return request.post("/logout", params);
}